package com.neuedu.dao.impl;

import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.neuedu.dao.AdminDao;
import com.neuedu.dao.DeviceTypeDao;
import com.neuedu.model.Admin;

//把dao接口实现类，交给spring进行管理
@Repository
public class AdminDaoImpl implements AdminDao {

	//代码层级的整合spring+mybatis
	@Autowired
	private SqlSessionTemplate sqlSessionTemplate;
	
	public void setSqlSessionTemplate(SqlSessionTemplate sqlSessionTemplate) {
		this.sqlSessionTemplate = sqlSessionTemplate;
	}
	
	
	@Override
	public Admin findUserMessageByName(Admin u) {
		// TODO Auto-generated method stub
		return sqlSessionTemplate.getMapper(AdminDao.class).findUserMessageByName(u);
	}

}
